<?php

class SFC_Benchmark
{
		public $tick;

		public function __construct()
		{
				$this->tick = microtime(TRUE);
		}

		public function elapsed($resetTick = FALSE, $accuracy = 4)
		{
				$elapsed = number_format(microtime(TRUE) - $this->tick, $accuracy);

				if ($resetTick) {
						$this->tick = microtime(TRUE);
						return $elapsed;
				} else {
						return $elapsed;
				}
		}
}

?>
